/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.member;

import com.enation.app.javashop.client.member.MemberAskClient;
import com.enation.app.javashop.core.client.fallback.member.MemberAskClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.member.dos.AskMessageDO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author fk
 * @version v2.0
 * @Description: 会员咨询
 * @date 2018/7/31 10:49
 * @since v7.0.0
 */
@FeignClient(name = "member-service", fallbackFactory = MemberAskClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface MemberAskClientFeignImpl extends MemberAskClient {

    /**
     * 卖家获取未回复的咨询数量
     *
     * @param sellerId
     * @return
     */
    @Override
    @RequestMapping(value = "/client/members/ask/count", method = RequestMethod.GET)
    Integer getNoReplyCount(@RequestParam("seller_id") Long sellerId);

    /**
     * 发送会员商品咨询消息
     * @param askMessageDO
     */
    @Override
    @RequestMapping(value = "/client/members/ask/send", method = RequestMethod.POST)
    void sendMessage(@RequestBody AskMessageDO askMessageDO);
}
